0
תגובות
I want to save some var to my session, and when i make the request with ajax this dont work. This is the ajax
the controller:
$http.post('saveToSession', {
hunts: hunts
});
hunts: hunts
});
the controller:
class HuntController extends \BaseController {
public function saveItems() {
Session::put('hunts', Input::get('hunts'));
return Response::json(array('saved' => true), 200);
}
public function destroy($id) {
Session::forget('hunts');
}
public function getHunts() {
return Session::get('hunts') // dont exits
}
}
public function saveItems() {
Session::put('hunts', Input::get('hunts'));
return Response::json(array('saved' => true), 200);
}
public function destroy($id) {
Session::forget('hunts');
}
public function getHunts() {
return Session::get('hunts') // dont exits
}
}